 <?php $endl = 1;
            $id = 0;
      ?>       
        
            <?php foreach($records as $row) {
                   if($endl%4==0)
                   echo "<div class='row'>"; 
             ?>
                <div class="col-md-3 col-sm-4 portfolio-item">
                    <a href="<?php echo base_url(); ?>members/notes_detail/<?php echo $row->notes_id ?>"class="portfolio-link" data-toggle="modal">
                        <div class="portfolio-hover">
                            <div class="portfolio-hover-content">
                                <i class="fa fa-plus fa-3x"></i>
                            </div>
                        </div>
                        <img src="<?=base_url()?>/Assets/img/note-img.png" class="img-responsive" alt=""  >
                    </a>
                 <div class="portfolio-caption">
                        <h4><?php echo $row->note_title; ?></h4>
                         <p class="text-muted"> semester: <?php echo $row->semester; ?> </p>
                        <p class="text-muted">Teacher: <?php echo $row->author; ?> </p>
                    </div>
                </div>





            <?php
            if($endl % 4 ==0)
                echo "</div>";

            $endl++;
            $id++; 

             }
              

              ?> 
  